package com.facishare.consumer;

import com.facishare.api.service.HelloService;
import com.facishare.api.service.TestService;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * Created by linchf on 2016/8/1.
 */
public class ServiceConsumer {

    public static void main(String [] args) {
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(new String[] {"consumer.xml"});
        context.start();
        HelloService helloService = (HelloService)context.getBean("helloService");
        TestService testService = (TestService)context.getBean("testService");
        System.out.println(helloService.sayHello(" world"));
        System.out.println(testService.showTest("test"));
    }
}
